﻿using GlobalObjects;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using WCFServiceWebRole1.DataObjects;

namespace WCFServiceWebRole1.Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IDataLogging" in both code and config file together.
    [ServiceContract]
    public interface IDataLogging
    {

        #region Data Logging

        [OperationContract]
        [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "log/{sensorid}")]
        [Description("Description for GET /template1")]
        string dataLogging(string sensorid,TempDataLog rawJson);

        [OperationContract]
        [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "logData")]
        [Description("Description for GET /template1")]
        string genericDataLogging(Stream rawJson);

        [OperationContract]
        [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Bare,
            RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "notification")]
        [Description("Notify an event")]
        string notification(NotificationRequest notify);

        #endregion


    }


}
